package com.mlnx.work.service;

import com.mlnx.work.entity.User;
import com.mlnx.work.pojo.dto.UserRightDto;
import com.mlnx.work.pojo.form.UserFindPassForm;
import com.mlnx.work.pojo.form.UserForm;
import com.mlnx.work.pojo.form.UserRegisterForm;
import com.mlnx.work.pojo.vo.UserVo;

import java.util.List;

/**
 * author name: amanda.shan
 * create time: 2020-12-28 16:58:01
 */ 
public interface UserService extends IBaseService<User>{

    /**
     * 用户注册
     * @param userRegisterForm
     */
    void register(UserRegisterForm userRegisterForm);

    /**
     * 获取所有
     * @param filter
     * @return
     */
    List<User> listAll(Object filter) throws IllegalAccessException;

    /**
     * 获邮件验证码
     * @param email
     * @return
     */
    String getEmailCode(String email);

    /**
     * 更新
     * @param userId
     * @param userForm
     */
    void updateById(Integer userId, UserForm userForm);

    /**
     * 获取用户权限
     * @param username
     * @return
     */
    UserRightDto getUserRoleDto(String username);

    /**
     * 找回密码
     * @param userFindPassForm
     */
    void findPas(UserFindPassForm userFindPassForm);

    /**
     * 获取自身信息
     * @return
     */
    UserVo getSelfUser();

}

